package com.macro.mall.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.macro.mall.mapper.OmsCompanyAddressMapper;
import com.macro.mall.domain.OmsCompanyAddress;
import com.macro.mall.service.OmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收货地址管理Service实现类
 * Created by macro on 2018/10/18.
 */
@Service
public class OmsCompanyAddressServiceImpl extends ServiceImpl<OmsCompanyAddressMapper, OmsCompanyAddress> implements OmsCompanyAddressService {

    @Override
    public List<OmsCompanyAddress> list() {
        List<OmsCompanyAddress> result = lambdaQuery()
                .select(OmsCompanyAddress::getId, OmsCompanyAddress::getAddressName, OmsCompanyAddress::getSendStatus, OmsCompanyAddress::getReceiveStatus, OmsCompanyAddress::getName,
                        OmsCompanyAddress::getPhone, OmsCompanyAddress::getProvince, OmsCompanyAddress::getCity, OmsCompanyAddress::getRegion, OmsCompanyAddress::getDetailAddress)
                .list();
        return result;
        /*
            id, address_name, send_status, receive_status, name, phone, province, city, region,
    detail_address
         */
    }
}
